package ae.pcfc.cldos.online.common.clddb.dao.provider;




import java.math.BigDecimal;

import org.hibernate.SQLQuery;
import org.hibernate.Session;

import ae.pcfc.cldos.online.common.clddb.dao.SequencesDAO;
import ae.pcfc.cldos.online.common.dao.GenericDAO;

/**
 * 
 * @author arosa
 *
 */
public class SequencesDAOImpl extends GenericDAO implements SequencesDAO {

	public Long getNextFNPTransactionId(){
		Session ses = getCurrentSession();
		SQLQuery query = ses.createSQLQuery("select SQ_CLDOS_FNP_TRANSACTION.nextval from dual");
		return ((BigDecimal)query.uniqueResult()).longValue();
	}
}
